<template>
  <div class="song-card">
    <div class="order-warp">
      <p class="order-num">{{ order }}</p>
    </div>
    <div class="img-warp">
      <img class="song-img"
           :src="data.picUrl+'?param=120y120'"
           lazy="loaded">
      <div class="play-icon">
        <i class="el-icon-video-pause"></i>
      </div>
    </div>
    <div class="song-content">
      <span class="song-name">{{data.name || "..."}}</span>
      <span class="singer">{{data.song.artists[0].name || "..."}}</span>
    </div>
  </div>
</template>
<script>
export default {
  props: ['data', 'order'],
  data () {
    return {
    }
  },
  created () { },
  mounted () { },
  methods: {}
}
</script>
 <style lang='less' scoped>
.song-card {
  display: flex;
  padding: 0.058565rem;
  font-size: 0.087848rem;
  cursor: pointer;
  &:hover .img-warp .play-icon {
    opacity: 1;
  }
  .order-warp {
    display: flex;
    padding: 0.073206rem;
    margin-right: 0.058565rem;
    justify-content: center;
    align-items: center;
  }
  .img-warp {
    position: relative;
    width: 0.439239rem;
    height: 0.439239rem;
    margin-right: 0.058565rem;

    .song-img {
      width: 0.439239rem;
      height: 0.439239rem;
      border-radius: 0.036603rem;
    }
    .play-icon {
      position: absolute;
      width: 0.263543rem;
      height: 0.263543rem;
      text-align: center;
      line-height: 0.263543rem;
      font-size: 0.175695rem;
      border-radius: 50%;
      background-color: rgba(225, 225, 225, 0.562);
      top: 50%;
      left: 50%;
      -webkit-transform: translate(-50%, -50%);
      transform: translate(-50%, -50%);

      opacity: 0;
      transition: all 0.3s;
      -webkit-transition: all 0.3s;
      i {
        color: red;
      }
    }
  }
  .song-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-around;
    overflow: hidden;
    font-size: 0.087848rem;
  }
  &:hover {
    background-color: aliceblue;
  }
}
</style>
